
<%@ page import="com.bafa.objects.*" %>
<% Season[] seasons = (Season[])request.getAttribute("LEAGUESEASONS");
Season[] cupSeasons = (Season[])request.getAttribute("CUPSEASONS");
User user = (User)session.getAttribute("LOGGEDON"); %>

<style type="text/css">

#Main {
	position:relative;
	width:701px;
	height:551px;
	z-index:1;
}

#Layer23 {
	position:absolute;
	width:300;
	height:115px;
	z-index:1;
	left: 100;
}
#Layer24 {
	position:absolute;
	width:450;
	height:22;
	z-index:1;
}
#Layer25 {
	position:absolute;
	width:300;
	height:115px;
	z-index:2;
	top: 22;
}

-->
</style>
<div id="Main">
  <div id="Layer23">
    <div class="avlh" id="Layer24">Season History </div>
    <div id="Layer25"><TABLE class=bafatablelarge cellSpacing=0 cellPadding=1 border=1>
              <TBODY>
              
              <TR>
                <TD>&nbsp;</TD>
                <TD><SPAN class=rhst><strong>Season</strong></SPAN></TD>
                <TD>
                <DIV class=mvb><strong><SPAN class=rhst>Year</SPAN></strong></DIV></TD>
                <TD>
                <DIV class=mvb><strong><SPAN class=rhst>Cup or League</SPAN></strong></DIV></TD>
                  <%if(user!=null && user instanceof AdminUser){%>
                  <TD><DIV class=mvb><strong><SPAN class=rhst>Switch On?</SPAN></strong></DIV></TD>
                  <%}%>
                </TR>
		<%for(int i=0;i<seasons.length;i++){
			Season season = seasons[i];%>  
              <TR class=r2>
                <TD><%if(season.isSwitchedOn()){%><A class=stats 
                  href="index.jsp?SeasonId=<%=season.getID()%>">View</a><%}else if(user!=null && user instanceof AdminUser){%><A class=stats 
                  href="displayeditseason.bafa?SeasonId=<%=season.getID()%>">Edit<%}%></TD>
                
                <TD><%=season.getSeason()%></TD>
                <TD><%=season.getYear()%></TD>
                <TD><%=(season.isLeague())?"League":"Cup"%></TD>
                <TD><%if(user!=null && user instanceof AdminUser){%>
		<%if(!season.isSwitchedOn()){%>
		                <A class=stats 
                  href="switchonseason.bafa?seasonId=<%=season.getID()%>">Switch On</a>
                <%}else{%>
                <A class=stats 
                  href="switchoffseason.bafa?seasonId=<%=season.getID()%>">Switch Off</a>
                <%}%>
                <%}%></TD>
                </TR>
		<%i++;%>
		<%if(i<seasons.length){season = seasons[i];%>
		<TR class=r1>
		<TD><%if(season.isSwitchedOn()){%><A class=stats 
		                  href="index.jsp?SeasonId=<%=season.getID()%>">View</a><%}else if(user!=null && user instanceof AdminUser){%><A class=stats 
                  href="displayeditseason.bafa?SeasonId=<%=season.getID()%>">Edit<%}%></TD>

		<TD><%=season.getSeason()%></TD>
		<TD><%=season.getYear()%></TD>
		<TD><%=(season.isLeague())?"League":"Cup"%></TD>
		<TD>
		<%if(user!=null && user instanceof AdminUser){%>
		<%if(!season.isSwitchedOn()){%>
		                <A class=stats 
                  href="switchonseason.bafa?seasonId=<%=season.getID()%>">Switch On</a>
                <%}else{%>
                <A class=stats 
                  href="switchoffseason.bafa?seasonId=<%=season.getID()%>">Switch Off</a>
                <%}%>
                <%}%>            </TD>
                </TR>
				<%}}%>
    </TBODY></TABLE>
    </div>
  </div>


</div>
